package com.mzj.saas.jobs.bill.repository;

import com.mzj.saas.jobs.bill.entity.CommunityHouse;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.repository.PagingAndSortingRepository;

import java.util.List;

public interface CommunityHouseRepository extends PagingAndSortingRepository<CommunityHouse, String>, JpaSpecificationExecutor<CommunityHouse>, JpaRepository<CommunityHouse, String> {

    List<CommunityHouse> findByIdIn(String id);

    List<CommunityHouse> findByIdIn(List<String> id);

    List<CommunityHouse> findByCommunityIdAndBuildIdAndUnitId(String communityId, Long buildId, Long unitId);

    int countByCommunityId(String communityId);
}
